import {createAction} from 'redux-actions';
import {
  GET_SYSTEM_LIST,
} from './../constants/actionTypes'
import * as systemApi from './../apis/system'

export const getSystemList = createAction(GET_SYSTEM_LIST, async(body)=>{
  return await systemApi.getList(body)
    .then((data) =>{
      if (data){
        return data
      }
      throw 'systemListError'
    })
}, (body)=>{
  return {
    ...body,
    sync: 'systemList'
  }
})